package com.online_mall.orders.service.impl;

import com.online_mall.orders.dao.OrdersDao;
import com.online_mall.orders.entity.Orders;
import com.online_mall.orders.service.OrdersService;
import com.online_mall.uitl.ResultFormat;
import com.online_mall.uitl.ResultUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * (Orders)表服务实现类
 *
 * @author makejava
 * @since 2025-09-02 15:03:23
 */
@Service("ordersService")
@Transactional(rollbackFor = Exception.class)
public class OrdersServiceImpl implements OrdersService {
    @Resource
    private OrdersDao ordersDao;


    @Override
    public ResultFormat queryAll(Orders orders) {
        return ResultUtil.success(ordersDao.queryAll(orders));
    }

    @Override
    public ResultFormat delete(String ordersId) {
        return ResultUtil.success(ordersDao.delete(ordersId));
    }
}